String s = value.trim();
try
{
return Integer.valueOf( s ).intValue();
}
catch ( NumberFormatException e )
{
String s = value.trim();
try
{
return Integer.parseInt(s);
}
catch ( NumberFormatException e )
{